//
//  FlipModalExampleViewController.m
//  FlipModalExample
//

#import "FlipModalExampleViewController.h"

@implementation FlipModalExampleViewController

- (void)buttonClick:(id)sender {
	flip.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
	[self presentModalViewController:flip animated:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
	
	flip = [[FlipController alloc] init];
	UIButton *viewButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
	CGRect buttonFrame = CGRectMake(110, 10, 100, 38);
	[viewButton setFrame:buttonFrame];
	[viewButton setTitle:@"Show" forState:UIControlStateNormal];
	[viewButton addTarget:self
				   action:@selector(buttonClick:)
		 forControlEvents:UIControlEventTouchUpInside];
	[self.view addSubview:viewButton];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (void)dealloc {
    [super dealloc];
}

@end
